Starts an RDB export: a Job copies the deployment's data, one RDB file per shard, into a backup repository (the default one unless `repository` is set)
curl --request POST \
--url http://localhost:3001/api/clusters/{clusterName}/transfers/exports \
--header 'Content-Type: application/json' \
--cookie token= \
--data '
{
"repository": "<string>",
"node": "replica",
"filters": {
"databases": [
7
],
"keyPatterns": [
"<string>"
]
},
"resources": {
"cpu": "<string>",
"memory": "<string>"
}
}
'import requests
url = "http://localhost:3001/api/clusters/{clusterName}/transfers/exports"
payload = {
"repository": "<string>",
"node": "replica",
"filters": {
"databases": [7],
"keyPatterns": ["<string>"]
},
"resources": {
"cpu": "<string>",
"memory": "<string>"
}
}
headers = {
"cookie": "token=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {cookie: 'token=', 'Content-Type': 'application/json'},
body: JSON.stringify({
repository: '<string>',
node: 'replica',
filters: {databases: [7], keyPatterns: ['<string>']},
resources: {cpu: '<string>', memory: '<string>'}
})
};
fetch('http://localhost:3001/api/clusters/{clusterName}/transfers/exports', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3001",
CURLOPT_URL => "http://localhost:3001/api/clusters/{clusterName}/transfers/exports",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'repository' => '<string>',
'node' => 'replica',
'filters' => [
'databases' => [
7
],
'keyPatterns' => [
'<string>'
]
],
'resources' => [
'cpu' => '<string>',
'memory' => '<string>'
]
]),
CURLOPT_COOKIE => "token=",
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:3001/api/clusters/{clusterName}/transfers/exports"
payload := strings.NewReader("{\n \"repository\": \"<string>\",\n \"node\": \"replica\",\n \"filters\": {\n \"databases\": [\n 7\n ],\n \"keyPatterns\": [\n \"<string>\"\n ]\n },\n \"resources\": {\n \"cpu\": \"<string>\",\n \"memory\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("cookie", "token=")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://localhost:3001/api/clusters/{clusterName}/transfers/exports")
.header("cookie", "token=")
.header("Content-Type", "application/json")
.body("{\n \"repository\": \"<string>\",\n \"node\": \"replica\",\n \"filters\": {\n \"databases\": [\n 7\n ],\n \"keyPatterns\": [\n \"<string>\"\n ]\n },\n \"resources\": {\n \"cpu\": \"<string>\",\n \"memory\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3001/api/clusters/{clusterName}/transfers/exports")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["cookie"] = 'token='
request["Content-Type"] = 'application/json'
request.body = "{\n \"repository\": \"<string>\",\n \"node\": \"replica\",\n \"filters\": {\n \"databases\": [\n 7\n ],\n \"keyPatterns\": [\n \"<string>\"\n ]\n },\n \"resources\": {\n \"cpu\": \"<string>\",\n \"memory\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"name": "<string>",
"namespace": "<string>",
"kind": "export",
"clusterName": "<string>",
"clusterNamespace": "<string>",
"phase": "Pending",
"createdAt": "<string>",
"startedAt": "<string>",
"completedAt": "<string>",
"createdBy": "<string>",
"scheduleName": "<string>",
"repository": "<string>",
"path": "<string>",
"node": "replica",
"mode": "merge",
"source": "<string>",
"sourceType": "export",
"files": [
{
"path": "<string>",
"shard": "<string>",
"sizeBytes": 123,
"keys": 123
}
],
"keysImported": 123,
"keysSkipped": 123,
"rollback": {
"mode": "auto",
"state": "pending",
"repository": "<string>",
"snapshotPath": "<string>",
"job": "<string>",
"message": "<string>"
},
"rollbackOf": "<string>",
"message": "<string>"
}{
"error": "<string>",
"statusCode": 123,
"message": "<string>"
}{
"error": "<string>",
"statusCode": 123,
"message": "<string>"
}{
"error": "<string>",
"statusCode": 123,
"message": "<string>"
}RDB Transfers
Starts an RDB export: a Job copies the deployment's data, one RDB file per shard, into a backup repository (the default one unless `repository` is set)
Starts an RDB export: a Job copies the deployment’s data, one RDB file per shard, into a backup repository (the default one unless repository is set). Reads from a replica unless node is primary.
POST
/
api
/
clusters
/
{clusterName}
/
transfers
/
exports
Starts an RDB export: a Job copies the deployment's data, one RDB file per shard, into a backup repository (the default one unless `repository` is set)
curl --request POST \
--url http://localhost:3001/api/clusters/{clusterName}/transfers/exports \
--header 'Content-Type: application/json' \
--cookie token= \
--data '
{
"repository": "<string>",
"node": "replica",
"filters": {
"databases": [
7
],
"keyPatterns": [
"<string>"
]
},
"resources": {
"cpu": "<string>",
"memory": "<string>"
}
}
'import requests
url = "http://localhost:3001/api/clusters/{clusterName}/transfers/exports"
payload = {
"repository": "<string>",
"node": "replica",
"filters": {
"databases": [7],
"keyPatterns": ["<string>"]
},
"resources": {
"cpu": "<string>",
"memory": "<string>"
}
}
headers = {
"cookie": "token=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {cookie: 'token=', 'Content-Type': 'application/json'},
body: JSON.stringify({
repository: '<string>',
node: 'replica',
filters: {databases: [7], keyPatterns: ['<string>']},
resources: {cpu: '<string>', memory: '<string>'}
})
};
fetch('http://localhost:3001/api/clusters/{clusterName}/transfers/exports', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3001",
CURLOPT_URL => "http://localhost:3001/api/clusters/{clusterName}/transfers/exports",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'repository' => '<string>',
'node' => 'replica',
'filters' => [
'databases' => [
7
],
'keyPatterns' => [
'<string>'
]
],
'resources' => [
'cpu' => '<string>',
'memory' => '<string>'
]
]),
CURLOPT_COOKIE => "token=",
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:3001/api/clusters/{clusterName}/transfers/exports"
payload := strings.NewReader("{\n \"repository\": \"<string>\",\n \"node\": \"replica\",\n \"filters\": {\n \"databases\": [\n 7\n ],\n \"keyPatterns\": [\n \"<string>\"\n ]\n },\n \"resources\": {\n \"cpu\": \"<string>\",\n \"memory\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("cookie", "token=")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://localhost:3001/api/clusters/{clusterName}/transfers/exports")
.header("cookie", "token=")
.header("Content-Type", "application/json")
.body("{\n \"repository\": \"<string>\",\n \"node\": \"replica\",\n \"filters\": {\n \"databases\": [\n 7\n ],\n \"keyPatterns\": [\n \"<string>\"\n ]\n },\n \"resources\": {\n \"cpu\": \"<string>\",\n \"memory\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3001/api/clusters/{clusterName}/transfers/exports")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["cookie"] = 'token='
request["Content-Type"] = 'application/json'
request.body = "{\n \"repository\": \"<string>\",\n \"node\": \"replica\",\n \"filters\": {\n \"databases\": [\n 7\n ],\n \"keyPatterns\": [\n \"<string>\"\n ]\n },\n \"resources\": {\n \"cpu\": \"<string>\",\n \"memory\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"name": "<string>",
"namespace": "<string>",
"kind": "export",
"clusterName": "<string>",
"clusterNamespace": "<string>",
"phase": "Pending",
"createdAt": "<string>",
"startedAt": "<string>",
"completedAt": "<string>",
"createdBy": "<string>",
"scheduleName": "<string>",
"repository": "<string>",
"path": "<string>",
"node": "replica",
"mode": "merge",
"source": "<string>",
"sourceType": "export",
"files": [
{
"path": "<string>",
"shard": "<string>",
"sizeBytes": 123,
"keys": 123
}
],
"keysImported": 123,
"keysSkipped": 123,
"rollback": {
"mode": "auto",
"state": "pending",
"repository": "<string>",
"snapshotPath": "<string>",
"job": "<string>",
"message": "<string>"
},
"rollbackOf": "<string>",
"message": "<string>"
}{
"error": "<string>",
"statusCode": 123,
"message": "<string>"
}{
"error": "<string>",
"statusCode": 123,
"message": "<string>"
}{
"error": "<string>",
"statusCode": 123,
"message": "<string>"
}Authorizations
JWT token stored in HTTP-only cookie
Path Parameters
Query Parameters
Minimum string length:
1Body
application/json
Response
Default Response
Available options:
export phase
Option 1 · enum<string>Option 2 · enum<string>Option 3 · enum<string>Option 4 · enum<string>
required
Available options:
Pending Read from a replica when the shard has one (default), or always from the primary.
Available options:
replica Available options:
merge sourceType
Option 1 · enum<string>Option 2 · enum<string>Option 3 · enum<string>Option 4 · enum<string>
Available options:
export Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?